In [1]:
from math import gcd
from collections import Counter
count = Counter()
for m in range(2, 1000):
for n in range(1 + (m % 2), m, 2):
if gcd(m, n) == 1:
p = 2 * m * (m + n)
if p > 1000:
break
count.update(range(p, 1001, p))
print(count.most_common(1)[0][0])
In [ ]: